#include <stdio.h>

//https://www.nowcoder.com/practice/db41a6ce80a646aa9a5eb6252ac2df76?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

int main() {
    int num = 0;
    int count = 0;
    scanf("%d", &num);
    while (num != 1) {
        if (num % 2 == 0) {
            num /= 2;
        } else if (num % 2 == 1) {
            num = num * 3 + 1;
        }
        count++;
    }
    printf("%d", count);
    return 0;
}

